// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIPluginInstanceOwner.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    /// blocks will make script call the wrong functions.
    /// </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("7d65452e-c167-4cba-a0e3-ddc61bdde8c3")]
	public interface nsIPluginInstanceOwner
	{
		
		/// <summary>
        /// Let the owner know what its instance is
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetInstance(System.IntPtr aInstance);
		
		/// <summary>
        /// Get the instance associated with this owner.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		System.IntPtr GetInstance();
		
		/// <summary>
        /// Get a handle to the window structure of the owner.
        /// This pointer cannot be made persistent by the caller.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetWindow(System.IntPtr aWindow);
		
		/// <summary>
        /// Get the display mode for the plugin instance.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		int GetModeAttribute();
		
		/// <summary>
        /// Create a place for the plugin to live in the owner's
        /// environment. this may or may not create a window
        /// depending on the windowless state of the plugin instance.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void CreateWidget();
		
		/// <summary>
        /// Get the associated document.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		System.IntPtr GetDocumentAttribute();
		
		/// <summary>
        /// Invalidate the rectangle
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void InvalidateRect(System.IntPtr aRect);
		
		/// <summary>
        /// Invalidate the region
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void InvalidateRegion(System.IntPtr aRegion);
		
		/// <summary>
        /// Have the plugin recomposited.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void RedrawPlugin();
		
		/// <summary>
        /// Get NetscapeWindow, corresponds to NPNVnetscapeWindow
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void GetNetscapeWindow(System.IntPtr aValue);
		
		/// <summary>
        /// Convert between plugin, window, and screen coordinate spaces.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void SetEventModel(int eventModel);
		
		/// <summary>
        /// Call NPP_SetWindow on the plugin.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void CallSetWindow();
		
		/// <summary>
        /// Get the contents scale factor for the screen the plugin is
        /// drawn on.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		double GetContentsScaleFactor();
	}
}
